//package com.buka.config;
//
//import com.netflix.loadbalancer.IRule;
//import com.netflix.loadbalancer.RandomRule;
//import com.netflix.loadbalancer.RoundRobinRule;
//import com.netflix.loadbalancer.WeightedResponseTimeRule;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RuleConfig {
//
//    @Bean
//    //加权响应时间规则  响应时间越长，权重越低
//    public IRule ribbonRule() {
////        return new WeightedResponseTimeRule();//加权
////        return new RandomRule();//随机
////        return new RoundRobinRule();//轮训
//       return new WeightedResponseTimeRule();
//    }
//
//
//}
